import Vue from "vue";
import Router from "vue-router";
import Layout from "@/layout";

Vue.use(Router);
const router = new Router({
  mode: "history",
  routes: [
    // {
    //   path: '/',
    //   component: Layout,
    //   children: [
    //     {
    //       path: '/index',
    //       component: () => import('@/views/paper/index'),
    //       name: 'PaperIndex',
    //       meta: { title: '试卷中心' }
    //     }
    //   ]
    // },
    {
      path: "/paper",
      name: "paper",
      component: () => import("@/views/paper/index"),
      meta: { title: "试卷中心" },
    },
    {
      path: "/problem-property",
      name: "problem-property",
      component: () => import("@/views/problem-property/index"),
      meta: { title: "问题性质" },
    },
    {
      path: "/study",
      name: "study",
      component: () => import("@/views/study/paper/do"),
      meta: { title: "学习巩固" },
    },
    {
      path: "/student",
      name: "student",
      component: () => import("@/views/student/index"),
      meta: { title: "学生管理" },
    },
    {
      path: "/auto-generate",
      name: "auto-generate",
      component: () => import("@/views/auto-generate/index"),
      meta: { title: "自动组卷" },
    },
    {
      path: "/do",
      name: "ExamPaperDo",
      component: () => import("@/views/exam/paper/do"),
      meta: { title: "试卷答题" },
    },
    {
      path: "/teacher",
      name: "teacher",
      component: () => import("@/views/teacher/index"),
      meta: { title: "教师系统" },
    },
    {
      path: "/mark-score",
      component: () => import("@/views/teacher/paper/read"),
      name: "score",
      meta: { title: "评分" },
    },
    {
      path: "/exam-analysis",
      component: () => import("@/views/analysis/paper/read"),
      name: "analysis",
      meta: { title: "错题分析" },
    },
    {
      path: "*",
      component: () => import("@/views/error-page/404"),
      meta: { title: "404" },
    },
  ],
});

export { router };
